@import url("https://fonts.googleapis.com/css?family=Raleway");
@import url('https://fonts.googleapis.com/css?family=Lusitana');
// If Google is unreachable, use local fallbacks
@font-face {
  font-family: 'Raleway-TTF';
  font-style: normal;
  font-weight: 400;
  src: local('Raleway'), local('Raleway-Regular'), url(/assets/fonts/raleway.ttf) format('truetype');
}
@font-face {
  font-family: 'Lusitana-TTF';
  font-style: normal;
  font-weight: 400;
  src: local('Lusitana'), url(/assets/fonts/lusitana.ttf) format('truetype');
}

@import "colors";
@import "typo";
@import "google-search";

@import "link_color";
a {
    @include link_color();
}

@import "lists";

// Base Color and Font
html {
    background-color: $bg;
}
body {
    @media (min-width : 1280px) {
        width: 60%;
    }
    @media (min-width: 640px) and (max-width: 1280px) {
        width: 80%;
        max-width: 768px;
    }
    @media (max-width: 640px) {
        width: 100%;
        max-width: 512px;
    }
    margin: 0em auto 25% auto;
    color: black;
    font-size: 16px;
    line-height: 2em !important;
    font-family: Lusitana, Lusitana-TTF, Microsoft Yahei, Hiragino Sans GB, WenQuanYi Micro Hei, serif;
    -webkit-font-smoothing: antialiased;
}

// Nav
nav {
    margin: 2em 0em;
    border: none {
        bottom: 1px solid lighten(black, 60%);
    }
}

// Info
span.title {
    font: 1.5em 'Raleway', 'Raleway-TTF','sans-serif';
    color: lighten(black, 30%);
}
span.date {
    margin: 0 0.5em;
}
span.link {
    float: right;
    font-size: 0.8em;
    a {
        margin-left: 1em;
    }
}
header span.title {
    font-size: 1em;
}
footer {
    color: lighten(black, 50%);
    font-size: 12px;
    margin: 2em 10%;
    border-top: double;
    clear: both;
    .piece {
        text-align: center;
        span {
            margin: 0 1em;
            display: inline-block;
        }
    }
}

// Margin
em, strong, a {
    margin-left: 0.1em;
    margin-right: 0.1em;
}

// Code
code {
    border: 1px #ccc solid;
    padding: 2px 4px;
    background: #fafafa;
    margin: 0 0.2em;
    font-size: 80%;
    line-height: inherit;
    white-space: nowrap;
}
pre {
    overflow-x: auto;
    code {
        border: none;
        word-wrap: normal;
        white-space: pre;
        padding: 0;
        margin: 0;
    }
}

// Article
article {
    width: 80%;
    max-width: 600px;
    margin: 1em auto;

    img {
        max-width: 100%;
        margin: 0 auto;
        display: block;
        border-radius: 5px;
        box-shadow: 3px 3px #ccc;
    }
}
